Make it aligned with Linux kernel.
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Removed unnecessary bits from the original patch, and removed
intremap_enabled() with its only caller gone.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
rdmsrl(MSR_IA32_APICBASE, msr_content);
if ( msr_content & MSR_IA32_APICBASE_EXTD )
{
- /*
- * Interrupt remapping should be also enabled by BIOS when
- * x2APIC is already enabled by BIOS, otherwise it's a BIOS
- * bug
- */
- if ( !intremap_enabled() )
- panic("Interrupt remapping is not enabled by BIOS while "
- "x2APIC is already enabled by BIOS!\n");
-
printk("x2APIC mode is already enabled by BIOS.\n");
x2apic_enabled = 1;
}
if ( iommu_enable_IR() )
{
+ if ( x2apic_enabled )
+ panic("Interrupt remapping could not be enabled while "
+ "x2APIC is already enabled by BIOS!\n");
+
printk("Would not enable x2APIC due to interrupt remapping "
"cannot be enabled.\n");
goto restore_out;
for_each_drhd_unit ( drhd )
disable_qinval(drhd->iommu);
}
-
-/*
- * Check if interrupt remapping is enabled or not
- * return 1: enabled
- * return 0: not enabled
- */
-int intremap_enabled(void)
-{
- struct acpi_drhd_unit *drhd;
- u32 sts;
-
- for_each_drhd_unit ( drhd )
- {
- sts = dmar_readl(drhd->iommu->reg, DMAR_GSTS_REG);
- if ( !(sts & DMA_GSTS_IRES) )
- return 0;
- }
-
- return 1;
-}
int iommu_supports_eim(void);
int iommu_enable_IR(void);
void iommu_disable_IR(void);
-int intremap_enabled(void);
int iommu_add_device(struct pci_dev *pdev);
int iommu_remove_device(struct pci_dev *pdev);